package cn.yangyanzhao.hotclock.test;

import cn.yangyanzhao.hotclock.subject.clock.CityClock;
import cn.yangyanzhao.hotclock.subject.clock.PhoneClock;
import cn.yangyanzhao.hotclock.subject.clock.UtcTime;

public class HotelWorldClocksRunner {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		UtcTime utcTime = new UtcTime();
		utcTime.attach("beijing", new CityClock(8));
		utcTime.attach("london", new CityClock(0));
		utcTime.attach("mascow", new CityClock(4));
		utcTime.attach("sydney", new CityClock(10));
		utcTime.attach("newYork", new CityClock(-5));
		
		PhoneClock phoneClock = new PhoneClock(8);
		phoneClock.setUtcTime(utcTime);

		phoneClock.setLocalTime(9);
		
		utcTime.printTimeOfAllClocks();
	}

}
